// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) 

package com.nnee.p_pr.p_activity.p_view;

import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.view.View;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.LinearLayout;
import com.nnee.p_img.p_video.ActivityMovieView;
import com.nnee.p_imgex.cls_ImageViewScanActiivity;
import com.nnee.p_pr.p_atom.cls_u;
import com.nnee.p_pr.p_atom.cls_z;
import com.nnee.p_pr.p_d.cls_c;
import com.nnee.p_pr.p_prot.cls_d;
import java.util.*;

// Referenced classes of package com.nnee.p_pr.p_activity.view:
//            PrisArticleView, ag

class bb extends WebViewClient
{

    bb(PrisArticleView prisarticleview)
    {
        a = prisarticleview;
        super();
    }

    public void onPageFinished(WebView webview, String s)
    {
        super.onPageFinished(webview, s);
        if(PrisArticleView.h(a) == null);
        if(PrisArticleView.i(a) >= 2) goto _L2; else goto _L1
_L1:
        PrisArticleView.j(a);
_L4:
        return;
_L2:
        if(s.equals("about:blank"))
        {
            PrisArticleView.a(a, 0);
            PrisArticleView.a(a, com.nnee.p_pr.p_activity.p_view.PrisArticleView.c(a), true, true);
        } else
        {
            if(com.nnee.p_pr.p_activity.p_view.PrisArticleView.c(a) != null)
            {
                a.h.a();
                List list = com.nnee.p_pr.p_activity.p_view.PrisArticleView.c(a).c();
                if(list != null)
                {
                    Iterator iterator = list.iterator();
                    int i = 0;
                    String s1;
                    ag ag1;
                    for(; iterator.hasNext(); ag1.a(s1, i))
                    {
                        s1 = (String)iterator.next();
                        ag1 = a.h;
                        i++;
                    }

                }
            }
            if(PrisArticleView.k(a))
            {
                PrisArticleView.l(a).setVisibility(8);
                PrisArticleView.m(a).setVisibility(8);
            }
        }
        if(true) goto _L4; else goto _L3
_L3:
    }

    public boolean shouldOverrideUrlLoading(WebView webview, String s)
    {
        int i = 0;
        if(!s.startsWith("web:getvideoclick;")) goto _L2; else goto _L1
_L1:
        ActivityMovieView.a(PrisArticleView.a(a), s.substring("web:getvideoclick;".length()));
        c.a(PrisArticleView.b(a), 739);
_L4:
        return true;
_L2:
        if(s.startsWith("web:gethtmlclick;"))
            try
            {
                Intent intent = new Intent("android.intent.action.VIEW", Uri.parse(s.substring("web:gethtmlclick;".length())));
                PrisArticleView.a(a).startActivity(intent);
            }
            catch(Exception exception)
            {
                exception.printStackTrace();
            }
        else
        if(s.startsWith("web:getimageclick"))
        {
            int j = s.lastIndexOf("=");
            if(j >= 0)
            {
                int k = Integer.parseInt(s.substring(j + 1));
                if(com.nnee.p_pr.p_activity.p_view.PrisArticleView.c(a) != null && com.nnee.p_pr.p_activity.p_view.PrisArticleView.c(a).h.size() > 0)
                {
                    cls_u u1 = (u)com.nnee.p_pr.p_activity.p_view.PrisArticleView.c(a).h.getFirst();
                    if(u1 != null && u1.K())
                    {
                        ArrayList arraylist = new ArrayList();
                        ArrayList arraylist1 = new ArrayList();
                        z az[] = u1.aA();
                        for(int l = i; l < az.length; l++)
                        {
                            if(az[l].u() == k)
                                i = l;
                            String s1 = az[l].g();
                            if(!arraylist.contains(s1))
                            {
                                arraylist.add(s1);
                                arraylist1.add(az[l].v());
                            }
                        }

                        int i1;
                        if(i >= arraylist1.size())
                            i1 = -1 + arraylist1.size();
                        else
                            i1 = i;
                        cls_ImageViewScanActiivity.a(PrisArticleView.a(a), com.nnee.p_pr.p_activity.p_view.PrisArticleView.d(a), PrisArticleView.e(a), i1, PrisArticleView.f(a), PrisArticleView.g(a));
                    }
                }
            }
        }
        if(true) goto _L4; else goto _L3
_L3:
    }

    final cls_PrisArticleView a;
}
